package cn.stylefeng.guns.modular.system.service;

import cn.stylefeng.guns.modular.system.model.GameLog;
import cn.stylefeng.guns.modular.system.model.GameUser;
import com.baomidou.mybatisplus.service.IService;
import com.nineshadow.games.Enum.GameStatusEnum;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liyong
 * @since 2019-11-28
 */
public interface IGameLogService extends IService<GameLog> {

    /**
     * 对手记录 用于获取对手信息
     * @param userId
     * @return
     */
    GameLog getOpponentInfo(Integer userId)throws Exception;

    /**
     * 结算
     * @param gameUsers
     * @throws Exception
     */
    void gameOver(String roomId,List<GameUser> gameUsers)throws Exception;

    /**
     * 退出房间
     * @param userId
     * @throws Exception
     */
    void quit(Integer userId)throws Exception;

    /**
     * 修改房间状态
     * @param roomId
     */
    void updateRoomState(Integer roomId, GameStatusEnum gameStatusEnum);
}
